Now let's start making purchases.
We need some sort of purchasing mechanism and I'm going to modify the shop that had the tools in it,
but this time it's going to sell.
It's going to sell parts.
We'll get like a little builder man in there or something.
Let's open our workspace, though, and clean this up a little bit.
These lots aren't very good the way they are at, so we're going to go to lots.
That's the lot collection.
Open it up and we got this player lot.
I think I'm going to make that brick, that anchor point transparent.
Player lot.
Anchor.
There we go.
Transparency one.
All right.
We don't need to see it.
And then let me close that player a lot and get rid of the other two.
All right.
Let's go ahead and make some copies of these and put them the way we want them.
I want to get that first copy over in this area that I cleared out.
So I'm going to hit the player lot collisions are off, so we'll duplicate in place control D we got
another one.
Let's move that location.
I'm not going to use the arrows though.
I'm going to go down to origin for the player lot itself and I'm going to make this -100 on the X that's
going to plop it over there, but the sign is facing the other way, no problem.
Instead of orientation being 90 degrees, let's make it -90.
Now it's facing they're facing each other.
Pretty good.
Let's make two copies.
Let's get a copy of this lot.
Control click and this lot by duplicating.
So we're going to duplicate two of them, Control D and then we're going to rotate.
I have my rotation on at 15 degree increments.
The snaps go back to home, make sure you hit, rotate and I'm going to go out.
1530.
45.
60.
How's that?
Do a control D and then let's rotate this.
1545.
What was that?
15, 30?
45, 60.
I don't know if I said it right, but I think it worked out.
That's pretty good.
Now go to the editor, hit edit, paint ground and I'm going to remove the grass, but I'm going to
pause the video so you don't have to watch me do that.
I'm going to do it on all of the lots that have grass.
All right.
So there we go.
We got the grass removed from our lots.
We'll go ahead and close the terrain editor and now we want to import the shop.
I actually put the URL in a file called URLs in the description for the shop that we created earlier
in the course, but I wanted to make it so that everybody had the exact same copy.
I put it on the marketplace.
This is my main, this is my alt, the Simtek nitro one is my alt.
So I put it on my main because he's verified and I can do like 100 uploads a month.
So let's go ahead and get that model and I'll show you how to modify it.
Let's go back to our Roblox studio and we'll do Toolbox inventory free my models, and now we can get
the shot if I drag that in there.
Oh, look at that.
That's pretty good.
I'm going to put it close to the spawn location, maybe in between the houses.
Yep.
11 scripts.
We were busy.
Hit.
Okay.
Close the tool box.
I'm going to rotate it so that it's looking at the spawn location for when you enter the game.
Might have to change those degrees.
All right, Now we have the pistol and the lemon and the and the slingshot floating around.
That is because let's open shop.
I put a folder in here saying, move these.
And I have a read.
Me too.
So if you want to use the shop as is the way we did it earlier, the read me will set it up Let's go
to move these and we're actually going to get rid of those items because we're not going to sell those
in this shop.
This is going to be house supply shop, right where you buy a house or buy a fence.
All right.
Now our screen guy.
Let's drag that down to starter gooey.
And if you'll recall, let's take a look at that shot frame.
And we'll go ahead and do Visible.
That's our shot frame.
Not bad.
All right.
And we're going to go back up here right where it says move these simple leaderboard.
We don't need it.
So that is if you need a leaderboard for points for purchasing stuff, let's go ahead and delete that
and then we'll get the shop.
This is going to go down into replicated storage.
Replicated storage.
Did I get it?
Yeah, right there shop.
Because we got the beam to.
Now for this shop, I'm going to make a little bit of a modification on the guy.
So let's go back to Shop Frame.
Let's make that visible.
And we have three things here.
I'm only going to sell two, I'm going to open up the items frame and then I'm going to get rid of one
of these buttons right over here on the scroll pane.
Let's do delete.
I just have my cabin and my fence, so I need to update the information in my item one button.
Now we have our image ID if we go to home.
Two videos ago, I believe it was We have our toolbox.
And then my image is we have our our cabin image and our fence image.
Let's make the first one the cabin.
I'm going to right click copy asset ID, I'm going to go to my image ID and keep this.
Let me stretch this out a little bit.
Keep this Roblox asset ID, colon slash slash.
Right.
Because it does an auto fix them because this isn't a texture.
So we don't have the we don't have the help of Roblox trying to figure out what we want.
So just put the ID right there and I'm going to do for since we have this open, let's get the fence
for this one.
Copied.
Go down here to the to the second item and put our fence.
We're going to check these two control V, So that's what, 7 to 9.
Okay.
Four nine, eight.
So we have different ones.
That's good.
All right.
So now on the top one.
Changing the names.
Easy enough, Right.
Cabin.
You're going to need to spell it the same as it is in server storage, though, right?
And then let's go down to our price.
We might as well do that right here and make whatever price you want.
Right.
Maybe 3000 points.
30,000 points, whatever.
All right.
We got our image ID for the second item.
And this is the fence, right?
You know what?
I'll put URLs to these to these images in here in case you didn't get them a couple videos ago.
It'll be in that file URLs on the resources in this lecture.
So now we're going to go to item name.
This has to be called the same thing as it is in server storage.
We just call it fence and then we'll do the price of the fence.
I might keep it 2000, Right.
All right.
Now let me get rid of that.
I need to have a property type.
I may want to have several different options of house, so I'm going to go to my to buy frame.
I'm going to open that up.
And I have my name label.
I have my price label.
I know we don't have these tagged with what they are in the UI, but you can always do that.
Let's go ahead and shrink down our price label a little bit, make it to whatever you want, hitting
control D to duplicate it.
And this is going to be my type, right?
It'll be like house or fence or chair or bed or something like that.
That way we have a key for our key value pairs which says, Hey, this is going to be a house, this
is going to be, you know what I mean?
Let's get our price label here.
Let's call this.
Prop type and I'm going to add to our items a string value.
Here's item one.
Hit an S string value.
Let's call this prop type.
This will be of type house.
And we'll go ahead and duplicate it.
Control D.
Move that down to item two under that prop type.
This is going to be fence and you can make a more general if you want, like maybe perimeter or something.
You might want to have like razor barbed stuff like that.
It's it could be a zombie game.
And what we'll do is when you select that, we're going to get the property type to have the price here
and we'll have the name and the image.
All right.
So now the purchasing isn't going to work yet, but let's go ahead and play it, see what we got for
the visual representation of the shop.
And we're going to have to.
Get our output window.
Address any errors.
We have more code changes.
Click.
Cabin and we got to show our price type.
But that's okay.
We're going to do that with a code.
We don't have any errors.
And then we have our fence.